#ifndef __WS2812_H__
#define __WS2812_H__


#include "fm33lc0xx_fl.h"

#define BIT_1  7        /*! 2/3 占空比 1 */
#define BIT_0  3        /*! 1/3 占空比 0 */

#define PIXEL_SIZE      3       /*! 灯珠数量 */
#define WS28XX_PWM_TIMER        GPTIM0


typedef struct
{
    uint8_t ColorStartData[3];
    uint8_t ColorRealData[24*PIXEL_SIZE];
    uint8_t ColorEndData;
}WS28XX_DataTypeStruct;


void setAllColor_RGB(uint8_t r, uint8_t g, uint8_t b);
void setPixeColor_RGB(uint16_t index, uint8_t r, uint8_t g, uint8_t b);
void show(void);

#endif


